/*
 * @(#)ListWorkflowDocThroughUserAction.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.workflow.web;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.dcivision.framework.SystemFunctionConstant;
import com.dcivision.framework.web.AbstractListAction;

/**
 * <p>Class Name:       ListWorkflowDocThroughUserAction.java    </p>
 * <p>Description:      The list action class for ListWorkflowDocTracking.jsp</p>
 * @author           Lun Au
 * @company          DCIVision Limited
 * @creation date    26/10/2004
 * @version          $Revision: 1.2 $
 */

public class ListWorkflowDocThroughUserAction extends AbstractListAction {

  public static final String REVISION = "$Revision: 1.2 $";

  /** Creates a new instance of ListWorkflowDocThroughUserAction */
  public ListWorkflowDocThroughUserAction() {
    super();
    this.setListName("workflowDocThroughUserList");
    this.setListFunctionName("getListDocThroughUser");
  }

  public String getFunctionCode() {
    // The document tracking report uses workflow monitor's permission or track's permission??
    return(SystemFunctionConstant.WORKFLOW_TRACK);
//    return(SystemFunctionConstant.WORKFLOW_MONITOR);
  }

  public String getMajorDAOClassName() {
    return("com.dcivision.workflow.dao.WorkflowProgressDAObject");
  }

  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException {

    // TODO: check if paper document module is enable

//    ((ListWorkflowDocThroughUserForm)form).setTaskType(null);
//    ((ListWorkflowDocThroughUserForm)form).setWorkflowCategoryID(com.dcivision.workflow.core.SystemWorkflowConstant.DMS_PAPER_DOCUMENT);
    ActionForward forward = super.execute(mapping,form,request,response);
log.debug ( "well done");
    return forward;
  }

}